package com.artxis.cms.model {
	
	import com.adobe.cairngorm.model.IModelLocator;
	import com.artxis.cms.vo.AccountVO;
	import com.artxis.cms.vo.SiteConfigVO;
	
	import mx.collections.ArrayCollection;
	//import com.artxis.cms.vo.siteConfigVO;
	
	[Bindable]
	public class ViewModelLocator implements IModelLocator {
	
		private static var instance:ViewModelLocator;

		public function ViewModelLocator(enforcer:SingletonEnforcer) {
		if (enforcer == null) {
				throw new Error( "You Can Only Have One ViewModelLocator" );
			}
		}

		public static function getInstance() : ViewModelLocator {
			if (instance == null) {
				instance = new ViewModelLocator( new SingletonEnforcer );
			}
			return instance;
		}

		// DEFINE YOUR VARIABLES HERE
	    public var userAccountInfo:AccountVO = new AccountVO;
		public var siteConfigData:SiteConfigVO = new SiteConfigVO();
		public var isAdmin:Boolean = false;
		public var menusArrColl:XMLList;
		public var menuArr:Array = new Array();
		public var workflowState:uint = 0;
		public var bodyState:uint = 0;
		public var butonLoginLabel:String ="LOGIN";
		public var adminBtnSWITCHER:String ="Admin Panel";
		public var adminMenu:ArrayCollection;
		public var viewModuleAdmin:String ="modules/testB.swf";
		public var ModuleAdminName:String ="Home";
		// DEFINE VIEW CONSTANTS
		public static const BUTTON_LOGIN:String ="LOGIN";
		public static const BUTTON_CONROL_PANEL:String ="Control panel";
		public static const FRONTEND_SCREEN:uint = 0;
		public static const ADMIN_SCREEN:uint = 1;
		public static const LOGIN_SCREEN:uint = 0;
		public static const WELCOME_SCREEN:uint = 1;
		

	}
}

// Utility Class to Deny Access to Constructor
class SingletonEnforcer {}